<template>
  <div>
    <h3>测试页面</h3>
  </div>
</template>

<script>
import { skuListBySpuId, spcListBySpuId } from "@/api/shop/goods";
import { allSpec } from "@/api/shop/spec/spec";
import { specValueList } from "@/api/shop/spec/specValue";

export default {
  name: "Test",
  data() {
    return {
      spuId: "1255379800819601410",
      specId: "2"
    };
  },
  watch: {},
  created() {
    this.skuListBySpuId("1255379800819601410");
    this.spcListBySpuId("1255379800819601410");
    this.allSpec();
    this.specValueList();
  },
  methods: {
    skuListBySpuId(spuId) {
      skuListBySpuId(spuId).then(response => {
        console.log("==============skuListBySpuId==============");
        console.log(response);
      });
    },
    spcListBySpuId(spuId) {
      spcListBySpuId(spuId).then(response => {
        console.log("==============spcListBySpuId==============");
        console.log(response);
      });
    },
    allSpec() {
      allSpec().then(response => {
        console.log("==============allSpec==============");
        console.log(response);
      });
    },
    specValueList() {
      var param = {
        specId: this.specId
      };
      specValueList(param).then(response => {
        console.log("==============specValueList==============");
        console.log(response);
      });
    }
  }
};
</script>

<style rel="stylesheet/scss" lang="scss">
</style>
